Skip to content

fix bug of ssh_marginalcontri when overlay is assigned to intersection#27

Merged
SpatLyu merged 3 commits into
mainfrom
dev
Jun 20, 2026
Merged

fix bug of ssh_marginalcontri when overlay is assigned to intersection#27
SpatLyu merged 3 commits into
mainfrom
dev

Conversation

@SpatLyu

@SpatLyu SpatLyu commented Jun 20, 2026

Copy link
Copy Markdown
Member

In the previous version of cisp, the spd values were incorrectly calculated as 0 when using overlay = "intersection":

res_spd_ntd = cisp::ssh_marginalcontri(
  "incidence ~ .", 
  data = dplyr::select(gdverse::NTDs, 1:4), 
  overlay = "intersection")
res_spd_ntd
#> ***   SSH Marginal Contributions    
#> 
#> | variable  | spd |
#> |:---------:|:---:|
#> | watershed |  0  |
#> | elevation |  0  |
#> | soiltype  |  0  |

This issue has now been fixed:

res_spd_ntd = cisp::ssh_marginalcontri(
  "incidence ~ .", 
  data = dplyr::select(gdverse::NTDs, 1:4), 
  overlay = "intersection")
res_spd_ntd
#> ***   SSH Marginal Contributions    
#> 
#> | variable  |    spd     |
#> |:---------:|:----------:|
#> | watershed | 0.12063395 |
#> | elevation | 0.07937803 |
#> | soiltype  | 0.05358794 |

@SpatLyu SpatLyu self-assigned this Jun 20, 2026
@SpatLyu SpatLyu merged commit 8ed4ece into main Jun 20, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant